<h4>Example <%= link_type.capitalize! -%> Services
<% if logged_in? %>
  <%= link_to_function("[+]", visual_effect(:toggle_slide,
      "add_" + port.class.name.downcase + "_" + link_type + port.id.to_s,
      :duration => 0.3), :class => "active", :style => "") -%>
<% else %>
  <% session[:original_uri] = request.request_uri %>
  <%= link_to ("[+]"), :controller => "home", :action => "login" %>
<% end %>
</h4>
  
<% services = ServiceLink.find(:all, :conditions => {:port_type => port.class.name, 
    :port_id => port.id}) %>
<% unless services.blank? %>
  <% services.each do |serv| %>
    <div class="<%= link_type -%>">
      <span style="float: left;">
        <%=h Service.find_by_id(serv.service_id).name -%>:
        <i><%= h (serv.operation_link || "no operation link specified") %></i>
      </span>
      <span style="float: right;">
        <i><%=h User.find_by_id(serv.source_id).name -%></i>
        <%= link_to '[x]', unlink_service_url(serv.id), :confirm => 'Are you sure you want to delete this service link?  This cannot be undone.', 
            :method => :delete if logged_in? && serv.source_id==current_user.id -%>  
      </span><br/>
    </div>  
  <% end %>
<% else %>
  <div class="no_annotations">
    <i>none</i>
  </div>  
<% end %>

<%= render :partial => 'annotations/service_form', :locals => {
    :link_type => link_type, :port => port} %>